package com.example.iot.controller;

import com.example.iot.entity.App;
import com.example.iot.entity.AppAndUpgrade;
import com.example.iot.service.impl.AppServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/app")
@RequiredArgsConstructor
@Component
public class APPController {
    private final AppServiceImpl appService;
    @GetMapping("/selectAll")
    public List<AppAndUpgrade> selectAll (String deviceId) {
        List<AppAndUpgrade> list=appService.selectAll(deviceId);
        return list;
    }
}
